import { createBrowserRouter } from "react-router-dom";
import Login from "@/views/Login";
import Layout from "@/views/Layout";
import AuthRoute from "./modules/AuthRoute";
import Register from "@/views/Register";
import Friendship from "@/views/Friendship";
import Group from "@/views/Group";
import Chat from "@/views/Chat";
import Collection from "@/views/Collection";
import Notification from "@/views/Notification";




const router = createBrowserRouter([
	{
		path: "/",
		element: (
			<AuthRoute>
				<Layout />
			</AuthRoute>
		),
		children: [
			{
                index:true,
                element:<Friendship/>
            },
            {
                path:'group',
                element:<Group/>
            },
            {
                path:'chat',
                element:<Chat/>
            },
            {
                path:'collection',
                element:<Collection/>
            },
            {
                path:'notification',
                element:<Notification/>
            }
		],
	},
	{
		path: "/login",
		element: <Login />,
	},
	{
		path: "/register",
		element: <Register />,
	},
]);

export default router;
